from utils import find_proper_divisors

MAX = 28123
abundants = [i for i in range(12, MAX) if sum(find_proper_divisors(i)) > i]

abundant_sums = set()
for i, x  in enumerate(abundants):
    for y in abundants[i:]:
        s = x + y
        if s > MAX: break
        abundant_sums.add(s)

print sum(range(MAX)) - sum(abundant_sums)
